<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3-8</title>
    
</head>
<body>
    <script src="../js/vue.js"></script>
    <div id="app">
        <!--.stop修饰符阻止单击事件继续传播，即阻止事件冒泡行为-->
        <!--冒泡行为？连续触发事件叫做冒泡事件-->
        <div @click="divClick">
            <button @click="btnClick">button</button>
        </div>

        <form action="baidu">
            <input type="submit" value="提交" @click.prevent="inputClick">
        </form>

    </div>

    <script>
        let app = new Vue({
            el:"#app",
            data:{
                msg:'hello world'
            },
            methods:{
                divClick(){
                    console.log("divClick");
                },
                btnClick(){
                    console.log("btnClick");
                }
            }
        })
    </script>
</body>
</html>